
#ifndef __SFAT_EXT_OPT__
#define __SFAT_EXT_OPT__

#include "mbedtls/aes.h"
#include "mbedtls/sha256.h"
#include "mbedtls/md5.h"

typedef struct
{
	// 配置
	uint8_t fsel;
	char md5_en;
	char sha_en;	
	uint32_t wr_block_size;	
	void *fil;

	// 内部管理
	uint8_t *buff;
	uint8_t *hash_val;
	uint8_t fst;
	int32_t  wr_site_old;
	uint32_t wr_fil_block;

	int main_site;
	int main_len;
	int info_site;
	int info_len;
	char main_aes_mode;
	char info_aes_mode;
	
	int ver[2];

	mbedtls_aes_context *aes_obj;
	mbedtls_sha256_context *sha_obj;
	mbedtls_md5_context *md5_obj;

	uint8_t hash_main_err;
	uint8_t hash_tab_err;
} sfat_ext_fil_type;

extern sfat_ext_fil_type  efat;


#endif  // __SFAT_EXT_OPT__
